import 'package:flutter_bloc/flutter_bloc.dart';

class CounterState {
  final int count;

  CounterState(this.count);
}

class CounterIncrement {}

class CounterBloc extends Bloc<CounterIncrement, CounterState> {
  CounterBloc() : super(CounterState(0)) {
    on<CounterIncrement>((event, emit) {
      emit(CounterState(state.count + 1));
    });
  }
}